The universal serial bus (USB) is an industry standardized bus architecture developed to provide efficient, cost effective connections of peripherals to a computer system. USB is designed to efficiently integrate many various peripheral devices (e.g., up to 127 peripheral devices per USB port) to the computer system. Such peripheral devices could include, for example, a light pen, keyboard, mouse, printer, scanner, and the like. USB is increasingly becoming the system of choice for connecting peripheral devices to computer systems.
USB differs from previous expansion bus systems. One difference is that USB connects peripheral devices to the computer system without consuming the input output resources of the computer system. Unlike previous expansion bus systems, peripheral devices designed to function with USB do not require memory or input output address space and do not require interrupt request lines from the computer system. This increases the number of peripheral devices the computer system is able to reliably support. USB also provides a single connector type to connect peripheral devices designed to function with USB (hereafter USB peripheral devices). Each USB peripheral device connects to a standard USB connector. Additionally, USB provides the ability to couple a number of peripheral devices to a single USB connector. USB also provides for automatic USB peripheral device configuration and eliminates computer system resource conflicts. These, and other, advantages allow USB to simplify and ease the process of adding peripheral devices to a computer system, providing a "plug and play" system which satisfies the requirements of the users.
There exits a problem, however, in that while USB provides numerous benefits to users, USB does not currently support the use of real time, hardware supported interrupts of the CPU by the connected USB peripheral devices. The USB specification does not provide the capability for a USB peripheral device to interrupt the CPU of the computer system. Instead, each connected USB peripheral device is polled in successive 1 ms intervals (e.g., frames) by a USB controller within the computer system. When a connected USB peripheral device requires service (e.g., a data transfer from an internal buffer to the computer system), it waits until the next 1 ms interval, or frame, in which it is polled to communicate the required service to the USB controller. In this manner, each connected USB peripheral device is polled to determine whether it requires service.
As a result, USB peripheral devices have no real time capability. Real time capability as used herein is defined as the ability to accurately determine the actual time of an event's occurrence with respect to the computer system clock. A USB peripheral device cannot use an interrupt the CPU of the computer system to thereby inform the computer system of the occurrence of the event. The USB peripheral device, instead, waits until it is polled to communicate with the computer system via the USB controller.
Another reason USB peripheral devices have no real time capability is that no precise timing information is communicated across the USB interface. USB peripheral devices communicate serially via 1 ms frames to the USB controller. The USB controller, in turn, interfaces the USB peripheral devices with the host computer system. As a result, the 1 ms USB frames are asynchronous and completely indeterminate with respect to the CPU of the computer system. This further precludes the accurate determination of the specific instant in time that an event occurred within a peripheral device.
This lack of real-time capability precludes the use of certain types of peripheral devices as USB peripheral devices. For example, a light pen device used in conjunction with a computer-aided design (CAD) program requires real-time capability to operate properly. Therefore, a light pen cannot operate properly coupled to a prior art computer system that employs the USB architecture. Another type of device, that is closely related to a light pen, that cannot operate properly coupled to USB architecture is an aiming device used in conjunction with a software game in which the game player aims and shots at targets on the display screen and the game responds in some suitable manner (e.g., a light gun). Other examples of peripheral devices which require real-time capability include industrial applications that control machinery or any type of system control in which the host processor needs to be informed immediately upon the occurrence of an event. These types of applications require the addition of a real-time capability to the USB architecture in order to properly function.
Thus, what is required is a method and system implementing a real time capability within the USB architecture. The required system should allow the USB architecture to have real-time capability in determining the actual time of an event's occurrence within a USB peripheral device. The present invention provides a novel solution to the above requirements.